function [winYellow, winBlue, draws, avgGoalsYellow, avgGoalsBlue] = parseResultFile(filename)

COLUMN_GOAL_YELLOW = 1;
COLUMN_GOAL_BLUE = 2;


rawData = load ('-ascii',filename);

%shotCount = sum(ballInData(find(ballInData(:,COLUMN_SHOTS_COUNT) > 0) , COLUMN_SHOTS_COUNT));
%passCount = sum(ballInData(find(ballInData(:,COLUMN_SUCCESSFUL_PASS) > 0) , COLUMN_SUCCESSFUL_PASS));
%captureCount = sum(ballInData(find(ballInData(:,COLUMN_SUCCESSFUL_CAPTURE) > 0) , COLUMN_SUCCESSFUL_CAPTURE));

winYellow = sum( rawData(:,COLUMN_GOAL_YELLOW) > rawData(:, COLUMN_GOAL_BLUE))
winBlue = sum( rawData(:,COLUMN_GOAL_YELLOW) < rawData(:, COLUMN_GOAL_BLUE))
draws = sum( rawData(:,COLUMN_GOAL_YELLOW) == rawData(:, COLUMN_GOAL_BLUE))

totalGoalsYellow = sum ( rawData(:, COLUMN_GOAL_YELLOW)) 
avgGoalsYellow = totalGoalsYellow / rows(rawData)
totalGoalsBlue = sum ( rawData(:, COLUMN_GOAL_BLUE)) 
avgGoalsBlue =  totalGoalsBlue / rows(rawData)
maxGoalDiffYellow = max(rawData(:, COLUMN_GOAL_YELLOW) - rawData(:,COLUMN_GOAL_BLUE))
maxGoalDiffBlue = max(rawData(:, COLUMN_GOAL_BLUE) - rawData(:,COLUMN_GOAL_YELLOW))
	
endfunction